<!-- src/components/AuthLayout.vue -->
<template>
  <div class="auth-layout">
    <div class="auth-background">
      <!-- 乒乓球动画元素 -->
      <div class="pingpong-ball ball1"></div>
      <div class="pingpong-ball ball2"></div>
      <div class="pingpong-ball ball3"></div>
    </div>
    <div class="auth-content">
      <div class="auth-logo">
        <!-- 乒乓图标 -->
        <svg class="pingpong-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">
          <path d="M512 960C264.58 960 64 759.42 64 512S264.58 64 512 64s448 200.58 448 448-200.58 448-448 448z m0-832c-212.08 0-384 171.92-384 384s171.92 384 384 384 384-171.92 384-384-171.92-384-384-384z" fill="#fff"></path>
          <path d="M672 384c0 88.37-71.63 160-160 160s-160-71.63-160-160 71.63-160 160-160 160 71.63 160 160z" fill="#fff"></path>
          <path d="M320 576c0-17.67 14.33-32 32-32s32 14.33 32 32-14.33 32-32 32-32-14.33-32-32zM672 576c0 17.67-14.33 32-32 32s-32-14.33-32-32 14.33-32 32-32 32 14.33 32 32z" fill="#fff"></path>
        </svg>
        <h1 class="auth-title">乒乓社区</h1>
        <p class="auth-subtitle">连接全球乒乓球爱好者</p>
      </div>
      <div class="auth-card-wrapper">
        <slot></slot>
      </div>
    </div>
  </div>
</template>
<script setup>
// 如果使用了 PingPongIcon.vue 组件，则需要在这里引入
// import PingPongIcon from './PingPongIcon.vue';
</script>

<style scoped>
.auth-layout {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
  opacity: 0.9;
  z-index: 0;
}

/* 乒乓球动画 */
.pingpong-ball {
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  animation: bounce 5s infinite alternate;
}

.ball1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.ball2 {
  top: 60%;
  right: 15%;
  animation-delay: 0.5s;
}

.ball3 {
  bottom: 25%;
  left: 20%;
  animation-delay: 1s;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-50px) translateX(40px);
  }
  50% {
    transform: translateY(30px) translateX(80px);
  }
  75% {
    transform: translateY(-30px) translateX(120px);
  }
}

.auth-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  padding: 2rem;
  text-align: center;
}

.auth-logo {
  margin-bottom: 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pingpong-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.auth-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  color: white;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-top: 0.5rem;
  font-weight: 300;
}

.auth-card-wrapper {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  padding: 2.5rem 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .auth-content {
    padding: 1rem;
  }

  .auth-card-wrapper {
    padding: 2rem 1.5rem;
  }

  .auth-title {
    font-size: 2rem;
  }

  .pingpong-icon {
    width: 60px;
    height: 60px;
  }

  .ball1, .ball2, .ball3 {
    display: none;
  }
}
</style>
